//
//  ThirdViewCell.m
//  UI - 豆瓣
//
//  Created by dllo on 15/10/31.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "ThirdViewCell.h"

@interface ThirdViewCell()
@property(nonatomic, retain) UILabel *lable1;
@property(nonatomic, retain) UILabel *lable2;
@property(nonatomic, retain) UILabel *lable3;



@end

@implementation ThirdViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubcell];
    }
    return  self;
}

-(void)createSubcell{

    UIImageView *imageV = [[UIImageView alloc] initWithFrame:CGRectMake(5, 10, 365, 118)];
    imageV.image = [UIImage imageNamed:@"bg_eventlistcell.png"];
    [self.contentView addSubview:imageV];
    [imageV release];
    
    
    self.lable1 = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 300, 40)];
    self.lable1.font = [UIFont systemFontOfSize:20];
    [self.contentView addSubview:self.lable1];
    
    
    self.lable2 = [[UILabel alloc] initWithFrame:CGRectMake(10, 50, 350, 40)];
    self.lable2.numberOfLines = 0;
    self.lable2.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:self.lable2];
    
    
    self.lable3 = [[UILabel alloc] initWithFrame:CGRectMake(10, 100, 300, 15)];
    self.lable2.font = [UIFont systemFontOfSize:15];
    [self.contentView addSubview:self.lable3];
}

-(void)setCinema:(Cinema *)cinema{

    if (_cinema != cinema) {
        [_cinema release];
        _cinema = [cinema retain];
    }
    self.lable1.text = self.cinema.cinemaName;
    self.lable2.text = self.cinema.address;
    self.lable3.text = self.cinema.telephone;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
